Skip to content

fix: detect the most common prompt injection phrasings - #15

Merged
veeqtoh merged 2 commits into
mainfrom
fix/injection-patterns-previous
Jul 31, 2026
Merged

fix: detect the most common prompt injection phrasings#15
veeqtoh merged 2 commits into
mainfrom
fix/injection-patterns-previous

Conversation

@veeqtoh

@veeqtoh veeqtoh commented Jul 31, 2026

Copy link
Copy Markdown
Member

Motivation and Context

The ignore and disregard patterns required the noun to follow the qualifier immediately, so "ignore all previous instructions" and its variants matched no built-in pattern at all. The forget pattern already had the correct structure with optional qualifier groups.

Aligns ignore and disregard with that structure, which also subsumes the two narrower prior/earlier patterns. Now caught:

  • ignore all previous instructions
  • disregard all previous instructions
  • ignore the previous instructions
  • disregard the previous instructions
  • ignore all previous prompts

Adds a false-positive dataset covering prose that mentions instructions without attempting an override.

Dependencies

N/A

Test Instructions

Run composer test

veeqtoh added 2 commits July 31, 2026 01:25
The ignore and disregard patterns required the noun to follow the qualifier
immediately, so "ignore all previous instructions" and its variants matched
no built-in pattern at all. The forget pattern already had the correct
structure with optional qualifier groups.

Aligns ignore and disregard with that structure, which also subsumes the two
narrower prior/earlier patterns. Now caught:

- ignore all previous instructions
- disregard all previous instructions
- ignore the previous instructions
- disregard the previous instructions
- ignore all previous prompts

Adds a false-positive dataset covering prose that mentions instructions
without attempting an override.
@veeqtoh
veeqtoh merged commit 00391a1 into main Jul 31, 2026
1 check passed
@veeqtoh
veeqtoh deleted the fix/injection-patterns-previous branch July 31, 2026 00:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant